package org.dna.uimodel;

import org.apache.wicket.model.LoadableDetachableModel;
import org.dna.MetroApplication;
import org.dna.metronomo.persistence.Job;

/**
 * Implementation of a LoadableDetachableModel for the Job entity.
 * */
public class LoadableJobModel extends LoadableDetachableModel<Job> {

	private static final long serialVersionUID = 4827846456635844342L;
	private int m_id;

	public LoadableJobModel(Job act) {
		super(act);
		m_id = act.getId();
	}

	@Override
	protected Job load() {
		return MetroApplication.get().getJobDAO().queryByID(m_id);
	}

}
